﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DataAccessLayer;
using System.Collections;
using System.Data;
using System.Data.OleDb;
using ATM_Pro.Module;

namespace ATM_Pro.Query
{
    public class QeuryInfoAnalyze
    {
        public QeuryInfoAnalyze()
        {
           
        }

        //check query params
        public static bool CheckQueryParams(DateTime begin, DateTime end, string atmId, string camId, string type, bool ischeck, ref string msg)
        {
            if (begin > end)
            {
                msg = "开始时间不能大于结束时间！";
                return false;
            }
            else if (begin == end)
            {
                msg = "开始时间不能等于结束时间！";
                return false;
            }
            else if (atmId == "")
            {
                msg = "请选择ATM机！";
                return false;
            }
            else if (camId == "")
            {
                msg = "请选择摄像机编号！";
                return false;
            }
            else if (ischeck)
            {
                if (type == "")
                {
                    msg = "请选择报警类型！";
                    return false;
                }
            }
            return true;
        }
    }
}
